<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <h1> {{name}} </h1>
    <button @click="add">翻转世界</button>
  </div>



  <script src="./js/vue-2.7.14.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        name: 'Hello,World'
      },
      methods: {
        add() {
          this.name = this.name.split("").reverse().join("");
        }
      }
    })
  </script>
</body>

</html>